# Copyright (C) 2007 "dbsolution sas" 
#
# This file is part of Weebotee.
#
# Weebotee is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Weebotee is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Weebotee.  If not, see <http://www.gnu.org/licenses/>.

import unittest
import settings


## THIS TESTS ARE RELATIVE TO TEST ITSELF
# try to prof that test utility specifically designed as test helper function
# work well
#
#  see:
#    *FAKE: setting FAKE var
#    *fake: function decorator
##
'''
class Main_unuseful_TestCase(unittest.TestCase):
    def setUp(self):
        settings.FAKE = True
        self.count = 0
        
    def addCount(self, *args, **kwargs):
        self.count+=1
    
    def testFakeDec(self):
        from ..libs.utils.mails import getMailNotification
        mail = getMailNotification({'prova':True}, callback=self.addCount)
        self.assert_(not self.count == 0, "Error: getMailNotification not called")
        self.assertEquals(self.count, 1, "Error: getMailNotification called multiple times")

        
    def testFakeVar(self):
        import settings as set
        self.assertEquals(set.FAKE,True)
        set.FAKE = False
        self.assertEquals(set.FAKE,False,
                          "The FAKE var can't work well no rest")

    def tearDown(self):
        self.count = 0
'''
